using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ReadyToUseTools._Hydrology
{
    /// <summary>
    /// <para>Watershed</para>
    /// <para>Determines the contributing area above each input point. A watershed is the upslope area that contributes flow.</para>
    /// <para>确定每个输入点上方的贡献区域。分水岭是贡献流量的上坡区域。</para>
    /// </summary>    
    [DisplayName("Watershed")]
    public class Watershed : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Watershed()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_InputPoints">
        /// <para>Input Points</para>
        /// <para>The point features used for calculating watersheds. These are referred to as pour points, because it is the location at which water pours out of the watershed.</para>
        /// <para>用于计算流域的点要素。这些被称为倾倒点，因为它是水从流域倾泻而出的位置。</para>
        /// </param>
        public Watershed(object _InputPoints)
        {
            this._InputPoints = _InputPoints;
        }
        public override string ToolboxName => "Ready To Use Tools";

        public override string ToolName => "Watershed";

        public override string CallName => "agolservices.Watershed";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_InputPoints, _PointIDField, _SnapDistance, _SnapDistanceUnits.GetGPValue(), _DataSourceResolution.GetGPValue(), _Generalize, _ReturnSnappedPoints, _WatershedArea, _SnappedPoints];

        /// <summary>
        /// <para>Input Points</para>
        /// <para>The point features used for calculating watersheds. These are referred to as pour points, because it is the location at which water pours out of the watershed.</para>
        /// <para>用于计算流域的点要素。这些被称为倾倒点，因为它是水从流域倾泻而出的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Points")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _InputPoints { get; set; }


        /// <summary>
        /// <para>Point Identification Field</para>
        /// <para><xdoc>
        ///   <para>An integer or string field used to identify to the input points.</para>
        ///   <para>The default is to use the unique ID field.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于标识输入点的整数或字符串字段。</para>
        ///   <para>默认设置是使用唯一 ID 字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Identification Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _PointIDField { get; set; } = null;


        /// <summary>
        /// <para>Snap Distance</para>
        /// <para><xdoc>
        ///   <para>The maximum distance to move the location of an input point.</para>
        ///   <para>Interactive input points and documented gage locations may not exactly align with the stream location in the DEM. This parameter allows the service to move the point to a nearby location with the largest contributing area.</para>
        ///   <para>By default, the snapping distance is calculated as the resolution of the source data multiplied by 5.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>移动输入点位置的最大距离。</para>
        ///   <para>交互式输入点和记录的量具位置可能与 DEM 中的流位置不完全一致。此参数允许服务将点移动到附近具有最大贡献区域的位置。</para>
        ///   <para>默认情况下，捕捉距离的计算方式为源数据的分辨率乘以 5。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Snap Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _SnapDistance { get; set; } = null;


        /// <summary>
        /// <para>Snap Distance Units</para>
        /// <para><xdoc>
        ///   <para>The linear units specified for the snap distance.</para>
        ///   <bulletList>
        ///     <bullet_item>Meters—The units are meters. This is the default.</bullet_item><para/>
        ///     <bullet_item>Kilometers—The units are kilometers.</bullet_item><para/>
        ///     <bullet_item>Feet—The units are feet.</bullet_item><para/>
        ///     <bullet_item>Yards—The units are yards.</bullet_item><para/>
        ///     <bullet_item>Miles—The units are miles.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>为捕捉距离指定的线性单位。</para>
        ///   <bulletList>
        ///     <bullet_item>米 - 单位为米。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>千米 - 单位为千米。</bullet_item><para/>
        ///     <bullet_item>英尺 - 单位为英尺。</bullet_item><para/>
        ///     <bullet_item>码 - 单位为码。</bullet_item><para/>
        ///     <bullet_item>英里—单位为英里。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Snap Distance Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _SnapDistanceUnits_value _SnapDistanceUnits { get; set; } = _SnapDistanceUnits_value._Meters;

        public enum _SnapDistanceUnits_value
        {
            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—The units are meters. This is the default.</para>
            /// <para>米 - 单位为米。这是默认设置。</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("Meters")]
            _Meters,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—The units are kilometers.</para>
            /// <para>千米 - 单位为千米。</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("Kilometers")]
            _Kilometers,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet—The units are feet.</para>
            /// <para>英尺 - 单位为英尺。</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("Feet")]
            _Feet,

            /// <summary>
            /// <para>Yards</para>
            /// <para>Yards—The units are yards.</para>
            /// <para>码 - 单位为码。</para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("Yards")]
            _Yards,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—The units are miles.</para>
            /// <para>英里—单位为英里。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("Miles")]
            _Miles,

        }

        /// <summary>
        /// <para>Data Source Resolution</para>
        /// <para><xdoc>
        ///   <para>Specifies the source data resolution that will be used in the analysis. The values are an approximation of the spatial resolution of the digital elevation model used to build the foundation hydrologic database. Since many elevation sources are distributed in units of arc seconds, an approximation is provided in meters for easier understanding.</para>
        ///   <bulletList>
        ///     <bullet_item>Blank—The hydrologic source, built from a 3-arc second data source, which is approximately 90-meter resolution elevation data, will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>Finest—The finest resolution available at each location from all possible data sources will be used.</bullet_item><para/>
        ///     <bullet_item>10 meters—The hydrologic source, built from a 1/3 arc second data source, which is approximately 10-meter resolution elevation data, will be used.</bullet_item><para/>
        ///     <bullet_item>30 meters—The hydrologic source, built from a 1-arc second data source, which is approximately 30-meter resolution elevation data, will be used.</bullet_item><para/>
        ///     <bullet_item>90 meters—The hydrologic source, built from a 3-arc second data source, which is approximately 90-meter resolution elevation data, will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将在分析中使用的源数据分辨率。这些值是用于构建基础水文数据库的数字高程模型的空间分辨率的近似值。由于许多高程源以角秒为单位分布，因此提供了以米为单位的近似值，以便于理解。</para>
        ///   <bulletList>
        ///     <bullet_item>空白—将使用基于 3 角秒数据源（分辨率约为 90 米的高程数据）构建的水文源。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>最佳 - 将使用所有可能数据源中每个位置可用的最佳分辨率。</bullet_item><para/>
        ///     <bullet_item>10 米 - 将使用根据 1/3 角秒数据源（大约是 10 米分辨率高程数据）构建的水文源。</bullet_item><para/>
        ///     <bullet_item>30 米 - 将使用根据 1 角秒数据源（分辨率约为 30 米高程数据）构建的水文源。</bullet_item><para/>
        ///     <bullet_item>90 米 - 将使用根据 3 角秒数据源（大约为 90 米分辨率高程数据）构建的水文源。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Source Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _DataSourceResolution_value? _DataSourceResolution { get; set; } = null;

        public enum _DataSourceResolution_value
        {
            /// <summary>
            /// <para> </para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description(" ")]
            [GPEnumValue(" ")]
            __,

            /// <summary>
            /// <para>Finest</para>
            /// <para>Finest—The finest resolution available at each location from all possible data sources will be used.</para>
            /// <para>最佳 - 将使用所有可能数据源中每个位置可用的最佳分辨率。</para>
            /// </summary>
            [Description("Finest")]
            [GPEnumValue("FINEST")]
            _FINEST,

            /// <summary>
            /// <para>10 meters</para>
            /// <para>10 meters—The hydrologic source, built from a 1/3 arc second data source, which is approximately 10-meter resolution elevation data, will be used.</para>
            /// <para>10 米 - 将使用根据 1/3 角秒数据源（大约是 10 米分辨率高程数据）构建的水文源。</para>
            /// </summary>
            [Description("10 meters")]
            [GPEnumValue("10m")]
            _10m,

            /// <summary>
            /// <para>30 meters</para>
            /// <para>30 meters—The hydrologic source, built from a 1-arc second data source, which is approximately 30-meter resolution elevation data, will be used.</para>
            /// <para>30 米 - 将使用根据 1 角秒数据源（分辨率约为 30 米高程数据）构建的水文源。</para>
            /// </summary>
            [Description("30 meters")]
            [GPEnumValue("30m")]
            _30m,

            /// <summary>
            /// <para>90 meters</para>
            /// <para>90 meters—The hydrologic source, built from a 3-arc second data source, which is approximately 90-meter resolution elevation data, will be used.</para>
            /// <para>90 米 - 将使用根据 3 角秒数据源（大约为 90 米分辨率高程数据）构建的水文源。</para>
            /// </summary>
            [Description("90 meters")]
            [GPEnumValue("90m")]
            _90m,

        }

        /// <summary>
        /// <para>Generalize</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output watersheds will be smoothed into simpler shapes or conform to the cell edges of the original DEM.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The edges of the polygons will conform to the cell edges of the original DEM. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The polygon boundaries will be smoothed into simpler shapes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是将输出分水岭平滑为更简单的形状还是符合原始 DEM 的像元边缘。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 面的边将与原始 DEM 的像元边保持一致。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 面边界将被平滑为更简单的形状。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generalize")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Generalize { get; set; } = null;


        /// <summary>
        /// <para>Return Snapped Points</para>
        /// <para><xdoc>
        ///   <para>Determines if a point feature at the watershed's pour point will be returned. If snapping is enabled, this might not be the same as the input point.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked–No point features will be returned.</bullet_item><para/>
        ///     <bullet_item>Checked–A point feature will be returned. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否返回流域倾点处的点要素。如果启用了捕捉，这可能与输入点不同。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 将返回无点要素。</bullet_item><para/>
        ///     <bullet_item>选中 - 将返回点要素。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Return Snapped Points")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _ReturnSnappedPoints { get; set; } = null;


        /// <summary>
        /// <para>Output Watershed</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Watershed")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _WatershedArea { get; set; }


        /// <summary>
        /// <para>Output Snapped Points</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Snapped Points")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _SnappedPoints { get; set; }


        public Watershed SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}